<template>
  <transition name="bounce">
    <section class="">
<!--       <div class="on-act bg-w mh-pd">
        <h4 class="tit warning">审核出错</h4>
        <swiper :options="swiperOption" ref="recentContact">
          <swiper-slide v-for="item in recentContacter" :key="item.id">
            <div class="flex">
              <div class="con-l">
                <div class="pic-box">
                  <img :src="item.pic" alt="头像">
                </div>
              </div>
              <div class="con-r">
                <p class="con-name mui-ellipsis" v-text="item.name">用户名</p>
                <p class="con-rest"><span>安徽黄山旅游风景区</span>|<span>男{{item.boy}}</span>|<span>女{{item.girl}}</span></p>
              </div>
            </div>
          </swiper-slide>
        </swiper>
      </div> -->
      <div class="m-panel bg-w mh-pd">
        <div class="panel-head">
          <h4>红娘审核</h4>
        </div>
        <div class="new-li" v-for="item in recentContact" :key="item.id" v-if="item.user_id">
          <div class="flex">
            <div class="con-l">
              <div class="pic-box">
                <img :src="item.portrait" alt="头像">
              </div>
            </div>
            <div class="con-r">
              <p class="con-name mui-ellipsis" v-text="item.nickname">用户名</p>
              <p class="con-rest"><span>{{item.gender==0 ? "男" : "女"}}</span>|<span>{{item.age}}岁</span>|<span>{{item.education || "未填写"}}</span></p>
            </div>
          </div>
        </div>
      </div>

      <div class="m-panel bg-w mh-pd">
        <div class="panel-head flex-bt">
          <h4>网友信息</h4>
<!--           <div class="mui-pull-right">
            <span class="sel-name">姓名 <i class="mh-arrow-down"></i></span>
            <span class="sel-a">年龄从大到小 <i class="mh-arrow-down"></i></span>
          </div> -->
        </div>
        <div class="new-li" v-for="item in friendsInfo" :key="item.id" v-if="item.id">
          <div class="flex">
            <div class="con-l">
              <div class="pic-box">
                <img :src="item.portrait" alt="头像">
              </div>
            </div>
            <div class="con-r">
              <p class="con-name mui-ellipsis" v-text="item.nickname">用户名</p>
              <p class="con-rest"><span>{{item.gender==0 ? "男" : "女"}}</span>|<span>{{item.age}}岁</span>|<span>{{item.education || "未填写"}}</span></p>
            </div>
          </div>
        </div>
      </div>

      <div class="m-panel bg-w mh-pd">
        <div class="panel-head">
          <h4>互动审核</h4>
        </div>
        <div class="new-li" v-for="item in activeArr" :key="item.id" v-if="item.id">
          <div class="flex">
            <div class="con-l">
              <div class="pic-box">
                <img :src="item.illustration" alt="logo">
              </div>
            </div>
            <div class="con-r">
              <p class="con-name mui-ellipsis" v-text="item.name">标题</p>
              <p class="con-rest"><span>{{item.setout_address}}</span>|<span>男{{item.limit_boy}}</span>|<span>女{{item.limit_girl}}</span></p>
            </div>
          </div>
        </div>
      </div>

      <div class="m-panel bg-w mh-pd">
        <div class="panel-head">
          <h4>产品审核</h4>
        </div>
        <div class="panel-content">
          <ul class="prod-list">
            <li class="prod-item flex" v-for="(item,index) in products" :key="index" v-if='item.id'>
              <div class="prod-lt">
                <div class="prod-pic">
                  <img :src="item.pic" alt="产品图">
                </div>
              </div>
              <div class="prod-rt">
                <p class="title" v-text="item.title">-</p>
                <p class="price">￥{{item.price}}</p>
                <p class="size">{{item.size}}</p>
              </div>
            </li>
          </ul>
        </div>
      </div>
    </section>
  </transition>
</template>

<script>
  import 'swiper/dist/css/swiper.css'
  import { swiper, swiperSlide } from 'vue-awesome-swiper'
  import FriendList from '@/components/hn-list/friends-list'
  import {MH_API} from "@/api/api";
  export default {
    name: "my-review",
    data () {
      return {
        swiperOption: {
          loop: false,
          slidesPerView: 2,
          slidesPerColumn: 2,
          spaceBetween: 15,
          slidesPerColumnFill : 'row'
        },
        recentContact: [
          // {
          //   id: '10001',
          //   pic: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1713526531,3850193221&fm=26&gp=0.jpg',
          //   name: '黄山相亲游',
          //   boy: 32,
          //   girl: 32
          // }
        ],
        friendsInfo: [
          // {
          //   id: '10001',
          //   pic: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=766585699,506578438&fm=26&gp=0.jpg',
          //   name: '章叁',
          //   sex: 2,
          //   edu: '本科',
          //   level: 'A+',
          //   age: 23
          // }
        ],
        activeArr: [],
        products: [
          // {
          //   pic: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3316084142,727466806&fm=200&gp=0.jpg',
          //   title: '郁金香玫瑰满天星花束套餐送给最美丽的她',
          //   price: 198,
          //   size: '盒装',
          //   profit: '1/10000',
          //   active: true
          // }
        ]
      }
    },
    methods: {

    },
    computed: {
      // swiper() {
      //   return this.$refs.recentContact.swiper
      // }
    },
    components: {
      swiper,
      swiperSlide,
      FriendList
    },
    created(){
      let self = this;
      MH_API.myExamList({
        type: 1
      }).then(res => {
        if (res.status === 200) {
          self.friendsInfo = res.data;
        }
      })
      MH_API.myExamList({
        type: 2
      }).then(res => {
        if (res.status === 200) {
          self.activeArr = res.data;
        }
      })
      MH_API.myExamList({
        type: 3
      }).then(res => {
        if (res.status === 200) {
          self.recentContact = res.data;
        }
      })
      MH_API.myExamList({
        type: 4
      }).then(res => {
        if (res.status === 200) {
          self.products = res.data;
        }
      })
    }
  }
</script>

<style lang="scss" scoped>
  @import "../../assets/css/mixin";
  .pic-box {
    background-color: #eee;
    @include mh-avatar-box(4rem, 4rem); margin-right:1rem;
  }
  .tit {
    margin: .8rem 0;
    font-size: 1.4rem;
    &.warning {color: #f26c60;}
  }
  .panel-head>h4 {margin-bottom: .6rem;@include sc(1.4rem, #333)}
  .prod-pic {
    @include mh-avatar-box(8.6rem, 8.6rem)
  }
  .prod-rt {
    flex: 1;
    padding-right: 4rem;
    padding-left: 1rem;
    .title {@include sc(1.3rem, #333);}
    .price {@include sc(1.3rem, #f26c60);}
    .size {@include sc(1.3rem, #999);}
  }
  .sel-name,.sel-a {
    margin-right: 1rem;
    @include sc(1.1rem, #666);
    &>i {border-top-color: #e685aa;}
  }
  .new-li{ float:left; width:50%;height:4.5rem;}
  .m-panel{ overflow:hidden;}
</style>
